<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>展示图片</title>
    <script type="text/javascript" src="/js/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" th:inline="javascript">
        jQuery(function ($) {
            $("#b1").click(function () {
                let path = [[${path}]]+"";
                let s = path.substr(path.lastIndexOf("/")+1);
                window.location.href = "/download?path=" + s;

            });
        });
    </script>
</head>
<body>
    <div>
        <img height="100%" width="100%" th:src="${path}" alt="null">
        <button id="b1">下载</button>
    </div>
</body>
</html>